<?php
	require("includes/basic.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
	<HEAD>
		
		<TITLE> :: <?php echo $appName?> :: </TITLE>
		<link rel='stylesheet' type='text/css' href='style/inner.css'>
		<script type='text/javascript' src='js/inner.js'></script>


		<!-- validation start -->

		<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
		<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="js/jquery.validationEngine.js" type="text/javascript"></script>
		
				
		<script>	
		$(document).ready(function() {

			
			$("#edit-client-contact").validationEngine()
		
		});
		
		
		function validate2fields(){
			if($("#firstname").val() =="" ||  $("#lastname").val() == ""){
				return false;
			}else{
				return true;
			}
		}
		</script>
		
		<!-- validation end -->

	</HEAD>

	<body unselectable="on" class="dialog"> 
		<?php $pageName="Administration View"; ?>
		<?php require("includes/header.php"); ?>

		<!-- devi : body content begins here -->
		<table class="dialog" cellpadding="0" cellspacing="0"><tr><td> 
		<table class="dialogbox" cellpadding="0" cellspacing="0"> 
		<tr><td> 
		<div class="dialoghead" unselectable="on">Edit Client Wizard</div>
        <div class="dialogcontent" style="height: 450px; unselectable="on">
		<form id="edit-client-contact" name="edit-customer" action="edit-clientcontact-process.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit()" class="nomargin">
		

		<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
		<tr><td style="vertical-align: top;">

		<div class="dialogspacer" unselectable="on">&nbsp;</div>
			<?php $buttonTitle = "Edit Client Contact"; ?>
			<?php $buttonSize = "200px"; ?>
			<?php require("greenHeaderButton.php"); ?>
		<div class="dialogspacer" unselectable="on">&nbsp;</div>

		<div class="dialogblockborder dialogblockborderheadline" unselectable="on"> 
		<div class="dialogblock" unselectable="on"> 
		<span class="dialogblockhead" unselectable="on"></span>

        
<?php	
if(isset($_SESSION['uid'])) {
$cid=$_REQUEST['clid'];	
$contdetails=mysql_query("select * from client_contact where contact_id=$cid");
$row=mysql_fetch_array($contdetails);
extract($row);
$contname=$row['contact_name'];
$phone1=$row['contact_phone_1'];
$phone2=$row['contact_phone_2'];
$email1=$row['contact_email_1'];
$email2=$row['contact_email_2'];
$add=$row['contact_address'];
$status=$row['record_status'];
$clientid=$row['client_id'];
echo "<input type='hidden' name='cliid' value='$clientid'>";

?>


	<center>
	<table border="0">
	
<tr><td colspan="5" align="center"><b>EDIT CLIENT CONTACT</b></td></tr>
<tr><td><input type="hidden" name="clicontid" value="<?php echo $cid; ?>"></td></tr>


    
<tr>
	<td>Contact Name</td>
    <td><Input type="text" name="cont_name" id="cont_name" class="validate[required] text-input" value="<?php echo $contname;?>"/></td>
    <td><img id="img1" name="img1" src="images/help.png" border="0" onmouseout="hideHelp(1);" onmouseover="showHelp(1);"></td>
</tr>
<tr>
	<td>Contact Phone 1</td>
    <td colspan=><Input type="text" name="phone1" id="phone1" class="validate[required,custom[onlyNumber]] text-input" value="<?php echo $phone1;?>"/></td>
    <td><img id="img2" name="img2" src="images/help.png" border="0" onmouseout="hideHelp(2);" onmouseover="showHelp(2);"></td>
</tr>
<tr>
	<td>Conact Phone 2</td>
    <td><Input type="text" name="phone2" id="phone2" class="validate[required,custom[onlyNumber]] text-input" value="<?php echo $phone2;?>"/></td>
    <td><img id="img3" name="img3" src="images/help.png" border="0" onmouseout="hideHelp(3);" onmouseover="showHelp(3);"></td>
</tr>

<tr>
	<td>Contact Email 1</td>
    <td colspan=><Input type="text" name="email1" id="email1" class="validate[required,custom[email]] text-input" value="<?php echo $email1;?>"/></td>
    <td><img id="img4" name="img4" src="images/help.png" border="0" onmouseout="hideHelp(4);" onmouseover="showHelp(4);"></td>
</tr>

<tr>
	<td>Contact Email 2</td>
    <td colspan=><Input type="text" name="email2" id="email2" class="validate[required,custom[email]] text-input" value="<?php echo $email2;?>"/></td>
    <td><img id="img5" name="img5" src="images/help.png" border="0" onmouseout="hideHelp(5);" onmouseover="showHelp(5);"></td>
</tr>

<tr>
	<td>Contact Address</td>
    <td ><textarea rows="5" cols="60" class="validate[required] text-input" id="add" name="add"><?php echo $add;?></textarea></td>
    <td><img id="img6" name="img6" src="images/help.png" border="0" onmouseout="hideHelp(6);" onmouseover="showHelp(6);"></td>
</tr>


<!-- <tr>
	<td>Record Status</td>
    <td><select name="recordstatus">
<?php
if($status=='Y')
{
	echo "<option value='Y' selected='selected'>Yes</option>";
	echo "<option value='N'>No</option>";
}
	else {
		echo "<option value='N' selected='selected'>No</option>";
		echo "<option value='Y'>Yes</option>";
	}
	?>

</select></td>
<td colspan="3">&nbsp;</td>
</tr> -->


	</table>
  </div></div>

	</center>
	<div class="dialogbuttons" unselectable="on">

		<input name="back" type="button" value="&#060;&#060; Back" class="dialogbutton" onclick="javascript:history.go(-1)">
		<input name="submit" type="submit" value="Save &#062;&#062;" class="dialogbutton">
		<input name="cancel" type="button" value="Cancel" class="dialogbutton" onclick="window.location.href='index.php';" style="margin-left: 50px;">
		
		</div>
</form>

		<div class="help" name="help1" id="help1" onmouseout="hideHelp(1);" onmouseover="showHelp(1);">
			Edit the Client Contact Name
		</div>


		<div class="help" name="help2" id="help2" onmouseout="hideHelp(2);" onmouseover="showHelp(2);">
			Edit the Phone No. 
		</div>

		<div class="help" name="help3" id="help3" onmouseout="hideHelp(3);" onmouseover="showHelp(3);">
			Edit another Phone No.
		</div>

		<div class="help" name="help4" id="help4" onmouseout="hideHelp(4);" onmouseover="showHelp(4);">
			Edit Email address of contact
		</div>

		<div class="help" name="help5" id="help5" onmouseout="hideHelp(5);" onmouseover="showHelp(5);">
			Edit another Email address of contact
		</div>

		<div class="help" name="help6" id="help6" onmouseout="hideHelp(6);" onmouseover="showHelp(6);">
			Edit residential address of client contact
		</div>

		</td></tr></table> 
		</td></tr></table> 
		<p>&nbsp;</p> 

		<!-- devi : body content ends here -->
		<?php }?>
		<?php require("includes/footer.php"); ?>
	</BODY>
</HTML>
